<?php if (!$user_tool_block['userinfo']->uid):?>
<form id="user-tool-login-form" method="POST" accept-charset="UTF-8" action="/user?destination=index">
<div class="">
  <div id="edit-name-wrapper" class="form-item">
   <label for="edit-name"><?php echo t('Username');?> <span title="This field is required." class="form-required">*</span></label>
   <input type="text" class="form-text required" value="" size="15" id="edit-name" name="name" maxlength="60">
  </div>
  <div id="edit-pass-wrapper" class="form-item">
   <label for="edit-pass"><?php echo t('Password');?> <span title="This field is required." class="form-required">*</span></label>
   <input type="password" class="form-text required" size="15" maxlength="60" id="edit-pass" name="pass">
  </div>
  <input type="submit" class="form-submit" value="Log in" id="edit-submit" name="op">
  <input id="edit-user-login" type="hidden" value="user_login" name="form_id">
  <div class="form-link">
    <?php echo $user_tool_block['renren_login_url'];?>
  </div>
  <div class="form-link"><a title="Create a new user account." href="/user/register"><?php echo t('Create new account');?></a></div>
  <div class="form-link"><a title="Request new password via e-mail." href="/user/password"><?php echo t('Request new password');?></a></div>
</div>
</form>
<?php else:?>
  <div class="user-tool">
    <div class="user-name"><?php echo (($user_tool_block['userinfo']->profile_nickname) ? $user_tool_block['userinfo']->profile_nickname : $user_tool_block['userinfo']->name);?></div>
    <div class="form-link"><a title="Logout" href="/logout"><?php echo t('Logout')?></a></div>
  </div>
<?php endif;?>